-- GENERATED SPELL FOR [Lesser Doomguard] --


function spell0_17864(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(31406,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17864', 12276, 1)
end

function spell1_17864(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(31408,pUnit)
pUnit:RegisterEvent('Sorts_17864', 5335, 1)
end

function Sorts_17864(pUnit, Event)
local choix_sorts_17864 = math.random(0, 1)
if choix_sorts_17864 == 0 then
pUnit:RegisterEvent('spell0_17864', 1, 1)
end
if choix_sorts_17864 == 1 then
pUnit:RegisterEvent('spell1_17864', 1, 1)
end
end

function mob17864_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17864', math.random(1500, 3000), 1)
end

function mob17864_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17864_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17864_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17864, 1, 'mob17864_Action')
RegisterUnitEvent(17864, 2, 'mob17864_Leave')
RegisterUnitEvent(17864, 3, 'mob17864_Kill')
RegisterUnitEvent(17864, 4, 'mob17864_Die')
